﻿<!DOCTYPE html>
<html manifest="/websocket.appcache">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>当前页内嵌HK Web Player测试</title>    
    <script type="text/javascript">
    </script>

    <link href="css/res.css" rel="stylesheet"/>
    <script src="PluginOK/base.js"></script> 
    <script src="PluginOK/wrl.js"></script>

<script language ="javascript" type ="text/javascript" for="WrlWS" event="onopen()"> 
    showmessage('连接成功');
	WrlVisibilityListener(true);
	WrlScrollListener(true);
	$('body').find('#btn_send').attr('disabled', false);
</script>

<script language ="javascript" type ="text/javascript" for="WrlWS" event="onclose(param1,param2,param3)"> 
    showmessage(param2);
	WrlVisibilityListener(false);
	WrlScrollListener(false);
	$('body').find('#btn_conn').attr('disabled', false);
    $('body').find('#btn_close').attr('disabled', true);
	$('body').find('#btn_send').attr('disabled', true);
</script>

<script language ="javascript" type ="text/javascript" for="WrlWS" event="onmessage(param)">
	DealRecMessage(param);
	showmessage(param, 'receive');
</script>

<script language ="javascript" type ="text/javascript" for="WrlWS" event="onerror(param)"> 
    showmessage(param);		
</script>
<script type="text/javascript">
    $(document).ready(function(){  
        $("#inp_url").attr("value",GetDefaultConn());
    });  
</script> 
</head>
<style>
.HKWebPlayer
{
margin: 0px 0px 0px 0px;
width: 20px;
height: 20px;
border: 1px solid blue;
}
</style>
<body>
<div id="HKWebPlayer" class="HKWebPlayer">
</div>
<object ID="WrlWS" CLASSID="CLSID:21ADE2E6-B4DD-4F3E-8BD5-9DDAD1785F3A" width="0" height="0"></object>       
<div class="container">
    <div class="page-header">
        <h2 style="margin-top:20px;margin-left:20px; text-align:center; ">海康SDK网页播放器在线体验</h2>
        <br />
        <br />
    </div>
    <div class="row" style="margin-bottom:20px;">
        <div class="col-sm-6 col-md-5 col-lg-4">
            <div>
                <input type="text" class="form-control" size="80" style="margin-bottom:3px;" id="inp_url" placeholder="连接" value="ws://localhost:83?

sid=123&flag=1" />
                <button type="button" id="btn_conn" class="btn btn-primary">连接</button>
				<span style="width:10px;">&nbsp;</span>
                <button type="button" id="btn_close" class="btn btn-danger" disabled="disabled">断开</button>
				<span style="width:10px;">&nbsp;</span>
                <button type="button" id="btn_clear" class="btn btn-danger">清空通讯记录</button>
            </div>
            <br />
            <div style="margin-bottom:20px;">
                <textarea id="inp_send" class="form-control" style="margin-bottom:3px;min-width:350px;min-height:200px;" placeholder="请输入发送的内容">{"req":"Wrl_HKWebPlayer","rid":95,"para":{"Type":"0","Title":"HK Web Player","Flag":72,"Left":0,"Top":0,"IframeX":0,"IframeY":0,"ScrollTop":0,"Version":"0","ShowType":4,"Web":[{"ID":1,"Uri":"d:/zorro/1.mp4","Option":"PlayEngine=3 AutoLoop=1"},{"ID":2,"Uri":"http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8","Option":"AutoLoop=1 PlayEngine=2"},{"ID":3,"Uri":"rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4","Option":"PlayEngine=2"},{"ID":4,"Uri":"http://www.yuanmaster.com/Files/RTSP.mp4","Option":"PlayEngine=3"}]}}</textarea>
                <button type="button" id="btn_send" class="btn btn-info btn-block">发送(Ctrl+Enter)</button>
            </div>
        </div>
        <div class="col-sm-6 col-md-7 col-lg-8">
            <div id="div_msgzone" class="panel panel-default">
                <div class="panel-heading">通讯记录</div>
                <div id="div_msg" class="panel-body" style="min-height:300px;"></div>
            </div>
        </div>
    </div>

</div>

</body>
</html>
